//
//  OtherOprerationCell.m
//  ForestPack
//
//  Created by 郑洲 on 2018/7/4.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "OtherOprerationCell.h"

@interface OtherOprerationCell ()

@property (nonatomic, strong) UILabel *eventLabel;

@end

@implementation OtherOprerationCell

+ (OtherOprerationCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"OtherOprerationCell";
    OtherOprerationCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[OtherOprerationCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.backgroundColor = [UIColor whiteColor];
        [cell createSubView];
    }
    
    return cell;
}

- (void)createSubView {
    self.eventLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, ScreenX375(14), SCREEN_WIDTH, ScreenX375(14))];
    self.eventLabel.textColor = REXADECIMALCOLOR(@"#999999");
    self.eventLabel.font = Kfont(12);
    self.eventLabel.textAlignment = NSTextAlignmentCenter;
    self.eventLabel.text = @"森林包装  刚刚发布了  包装设计  的需求";
    [self addSubview:self.eventLabel];
    
    UIButton *moreBtn = [[UIButton alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - ScreenX375(248)) / 2, ScreenX375(39), ScreenX375(248), ScreenX375(30))];
    [moreBtn setTitle:@"看看我的同行都在做什么" forState:UIControlStateNormal];
    [moreBtn setTitleColor:ThemeColor forState:UIControlStateNormal];
    moreBtn.titleLabel.font = Kfont(12);
    moreBtn.layer.cornerRadius = ScreenX375(15);
    moreBtn.layer.borderColor = ThemeColor.CGColor;
    moreBtn.layer.borderWidth = 1;
    moreBtn.clipsToBounds = YES;
    [moreBtn addTarget:self action:@selector(seeClicked) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:moreBtn];
}

- (void)seeClicked {
    if (_seeClick) {
        _seeClick();
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
